#define _CRT_SECURE_NO_WARNINGS
#include "Stack.h"
#include "Queue.h"

void stacktest()
{
	ST st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);
	StackPush(&st, 5);
	StackPush(&st, 6);
	printf("%d\n", StackSize(&st));
	printf("%d\n", StackTop(&st));

	StackPop(&st);
	StackPop(&st);
	StackPop(&st);
	printf("%d\n", StackSize(&st));
	printf("%d\n", StackTop(&st));
	printf("%d\n", StackEmpty(&st));

	StackDestroy(&st);
}

void QueueTest()
{
	Queue q;
	QueueInit(&q);

	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);
	QueuePush(&q, 6);
	printf("%d\n", QueueSize(&q));
	printf("%d\n", QueueFront(&q));
	printf("%d\n", QueueBack(&q));
	printf("%d\n", QueueEmpty(&q));

	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);
	QueuePop(&q);

	printf("%d\n", QueueSize(&q));
	/*printf("%d\n", QueueFront(&q));
	printf("%d\n", QueueBack(&q));*/
	printf("%d\n", QueueEmpty(&q));


	QueueDestory(&q);
}

int main()
{
	//QueueTest();
	stacktest();
	return 0;
}